//
//	HOME AUTOMATION GATEWAY PROJECT
//
//  (c) 2008 mocom software GmbH & Co KG
//	for European Microsoft Innovation Center
//
//  $Author: volker $
//  $Date: 2009-03-25 16:44:13 +0100 (Mi, 25. Mrz 2009) $
//  $Revision: 294 $
//
//  Microsoft dotNetMF Project
//  Copyright ©2001,2002,2003,2004 Microsoft Corporation
//  One Microsoft Way, Redmond, Washington 98052-6399 U.S.A.
//  All rights reserved.
//  MICROSOFT CONFIDENTIAL
//
//-----------------------------------------------------------------------------

#include <tinyhal.h>
#include "..\BlockStorage\SD\SD_BL.h"


#if defined(ADS_LINKER_BUG__NOT_ALL_UNUSED_VARIABLES_ARE_REMOVED)
#pragma arm section rwdata = "g_AvailableFSInterfaces"
#endif

extern FILESYSTEM_DRIVER_INTERFACE g_FAT32_FILE_SYSTEM_DriverInterface;
extern STREAM_DRIVER_INTERFACE g_FAT32_STREAM_DriverInterface;

extern struct BlockStorageDevice  g_STNAND0x_BS;
extern struct IBlockStorageDevice g_STNAND0x_BS_DeviceTable;
extern struct BLOCK_CONFIG *STNAND0x_BL_InitConfig();

extern struct BlockStorageDevice g_SD_BS;
extern struct SD_BLOCK_CONFIG g_SD_BS_Config;

FileSystemVolume g_HAG_NAND_FS;

void FS_AddVolumes()
{
	FileSystemVolumeList::AddVolume( &g_HAG_NAND_FS,"ROOT", 0, 0, &g_FAT32_STREAM_DriverInterface, &g_FAT32_FILE_SYSTEM_DriverInterface, &g_STNAND0x_BS, 0, FALSE );
}

void FS_MountRemovableVolumes()
{
	if (SD_BS_Driver::DetectCard(&g_SD_BS_Config)) 
		FS_MountVolume("SD1", 0, 0, &g_SD_BS);	
}

FILESYSTEM_INTERFACES g_AvailableFSInterfaces[] =
{
    { &g_FAT32_FILE_SYSTEM_DriverInterface, &g_FAT32_STREAM_DriverInterface },
};

const size_t g_InstalledFSCount = 1;

#if defined(ADS_LINKER_BUG__NOT_ALL_UNUSED_VARIABLES_ARE_REMOVED)
#pragma arm section rwdata
#endif
